<%@page import="Model.Purchase.PurchaseMaterielList"%>
<%@page import="Model.Purchase.PurchaseList"%>
<%@page import="Model.Purchase.PurchaseMaterielOfferList"%>
<%@page import="Model.Purchase.PurchaseOfferList"%>
<%@page import="RssEasy.Core.HttpRequestHelper"%>
<%@page import="RssEasy.Core.CookieHelper"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
CookieHelper cookie=new CookieHelper(request, response);
HttpRequestHelper hrh=new HttpRequestHelper(pageContext).request();
PurchaseOfferList pol=new PurchaseOfferList(pageContext);
String types=hrh.get("types");
if(types.equals("1")){
PurchaseMaterielOfferList pmol=new PurchaseMaterielOfferList(pageContext);
pol.delete().where("myid=? and purchaseid=?",cookie.Get("myid"),hrh.get("projectid")).submit();
pmol.delete().where("myid=? and purchaseid=?",cookie.Get("myid"),hrh.get("projectid")).submit();
out.print("1");
}else if(types.equals("2")){
PurchaseList pl=new PurchaseList(pageContext);
PurchaseMaterielList pml=new PurchaseMaterielList(pageContext);
pl.delete().where("myid=? and id=?",cookie.Get("myid"),hrh.get("projectid")).submit();
pml.delete().where("purchaseid=?",hrh.get("projectid")).submit();
out.print("1");
}
%>
